<div class="panel panel-primary">
  <div class="panel-heading">
    <h2 class="panel-title">{{image.title}}</h2>
  </div>
  <div class="panel-body">
    <p>{{image.description}}</p>
    <div class="col-md-12 text-center">
      <img src="/public/upload/{{image.filename}}" alt="{{image.title}}"
        class="thumbnail">
    </div>
  </div>
  <div class="panel-footer">
    <div class="row">
      <div class="col-md-8">
        <button class="btn btn-success" id="btn-like" data-id="{{image.uniqueId}}">
          <i class="fa fa-heart"> 点赞</i>
        </button>
        <strong class="likes-count">{{image.likes}}</strong> &nbsp; - &nbsp;
        <i class="fa fa-eye"></i>
        <strong>{{image.views}}</strong>
        &nbsp; - &nbsp; 发表于: <em class="text-muted">{{timeago image.timestamp}}</em>
      </div>
      <div class="col-md-4 text-right">
        <button class="btn btn-danger" id="btn-delete" data-id="{{image.uniqueId}}">
          <i class="fa fa-times"></i>
        </button>
      </div>
    </div>
  </div>
</div>

<div class="panel panel-default">
  <div class="panel-heading">
    <div class="row">
      <div class="col-md-8">
        <strong class="panel-title">评论</strong>
      </div>
      <div class="col-md-4 text-right">
        <button class="btn btn-default btn-sm" id="btn-comment" data-id="{{image.uniqueId}}">
          <i class="fa fa-comments-o"> 发表评论...</i>
        </button>
      </div>
    </div>
  </div>
  <div class="panel-body">
    <blockquote id="post-comment">
      <div class="row">
        <form action="/images/{{image.uniqueId}}/comment" method="post">
          <div class="form-group col-sm-12">
            <label for="name" class="col-sm-2 control-label">昵称:</label>
            <div class="col-sm-10"><input type="text" class="form-control" name="name"></div>
          </div>
          <div class="form-group col-sm-12">
            <label for="email" class="col-sm-2 control-label">Email:</label>
            <div class="col-sm-10"><input type="text" class="form-control" name="email"></div>
          </div>
          <div class="form-group col-sm-12">
            <label for="comment" class="col-sm-2 control-label">评论:</label>
            <div class="col-sm-10">
              <textarea name="comment" class="form-control" rows="2"></textarea>
            </div>
          </div>
          <div class="form-group col-sm-12">
            <div class="col-sm-12 text-right">
              <button class="btn btn-success" id="comment-btn" type="submit">
                <i class="fa fa-comment"></i> 发表
              </button>
            </div>
          </div>
        </form>
      </div>
    </blockquote>
    <ul class="media-list">
      {{#each comments}}
      <li class="media">
        <a href="#" class="pull-left">
          <img src="http://www.gravatar.com/avatar/{{gravatar}}?d=monsterid&s=45"
            class="media-object img-circle">
        </a>
        <div class="media-body">
          {{comment}}
          <br/>
          <strong class="media-heading">{{name}}</strong>
          <small class="text-muted">{{timeago timestamp}}</small>
        </div>
      </li>
      {{/each}}
    </ul>
  </div>
</div>